/* This class calles StratGen takes each strategy it gets and passes
it to the battle simulator.  It then returns the best strategy to
the callee*/
#pragma once
#include <BWAPI.h>
#include "StratGen.h"
#include "StarUtil.h"
#include "StrategyGen.h"
#include "Result.h"
#include "CompStrat.h"
class StratChooser
{
public:
	StratChooser(void);
	~StratChooser(void);

	// returns the best local startegy if called durring similations
	// if called after returns the best simulation found
	StrategyGen getBestStrat(); //Call to get best strategy 
	
	bool isNotDone(); // true if it is still running threw possible startegies
	void nextStep(); // gets the next step from the battle simulator
	void reset();	// resets for the the next battle simulations
	void setup();	// called initally to setup the chooser
	void resolve(); // runs the entier simulation in one frame
	bool currentSimDone(); // if the current startegy simulation is done
private:
	StratGen generator;
	BattleSimulator *battle;
	std::vector<std::string> allyUnits;
	bool done;
	bool ready;
	bool first;
	Result best;
	StrategyGen bestStrat;
	StrategyGen *currentStrat;
	CompStrat comp;

};
